static void PrintHeadgroupChargeDensity()
{
  real distanceFromBilayerCentre;
  int bin;

  FILE *eppFilePtr;
  char eppSnapFile[ 20 ];
  char time_ns[ 9 ]; // string containing timeNow, e.g. "100", in ns

  sprintf( time_ns, "%d", ( int ) ( 0.5 + timeNow *  TIME_ns ) );
  eppSnapFile[ 0 ] = '\0';
  strcat( eppSnapFile, "headgroupChgDens-" );
  strcat( eppSnapFile, time_ns );
  strcat( eppSnapFile, ".dat" );
  eppFilePtr = fopen( eppSnapFile, "w" );

  // printing out
  for ( bin = 0; bin < sizeHistEpp; bin++ ) { 
    distanceFromBilayerCentre = ( bin + 0.5 ) * meanEppDeltaZ - meanEppBoxHeight / 2.; 
    fprintf( eppFilePtr, "%7.3f", ( ( distanceFromBilayerCentre ) * LENGTH_nm ) ); // printing abscissa [nm]
    /*     fprintf( eppFilePtr, "%20.9f", ( headgroupHistEpp[ bin ] / ( AREA_m2 ) ) ); // chg density [ C / m^2 ] */
    // assumption: the fundamental unit of charge in Brahms is "e"
    fprintf( eppFilePtr, "%20.9f", ( headgroupHistEpp[ bin ] * meanEppDeltaZ  * e_IN_C / ( AREA_m2 ) ) ); // charge density [ C / m^2 ]
    fprintf( eppFilePtr, "\n" );
  }
  fclose( eppFilePtr );
}

